package com.zero.singleton.lazy;

public class Saber {
    //只做声明
    private static Saber instance = null;
    //私有化构造方法
    private Saber(){
        System.out.println("Saber实例被创建");
    }
    //对外提供获得实例的方法
    public static Saber getInstance(){
        if (instance == null){
            instance = new Saber();
        }
        return instance;
    }
}
